<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	template="/layout/page/form/page-fieldset-template.xhtml">	
	<ui:param name="addTopicViewBean" value="#{commonContentViewBean.parent}" />\
	<ui:param name="topicViewBean" value="#{commonContentViewBean}"/>
	<ui:param name="compId" value="#{TopicViewBean.id}" />
	<ui:param name="compTitle" value="发表主题" />	
	<ui:param name="compToggleable" value="true" />
	
	<ui:define name="compContent">
	<h:panelGrid columns="2">
			<h:panelGroup style="float: right;">
		     	<h:outputText value="主题名称："/>
		 	</h:panelGroup>
			<h:panelGroup style="float: left;">
				<h:inputText id="topicName" value="#{topicViewBean.topictitle}"
					required="true" />
			</h:panelGroup>
			<h:panelGroup style="float: right;">
		     	<h:outputText value="主题内容："/>
		 	</h:panelGroup>
			<h:panelGroup style="float: left;">
			   <h:inputTextarea id="topicContent" styleClass="portal-editor" 
			    	value="#{topicViewBean.topiccontent}" />
			</h:panelGroup>
	</h:panelGrid>
	</ui:define>
	
	
	<ui:define name="compButtons">
        <p:commandButton actionListener="#{topicAction.save}"
			title="保存" 
			onstart="SinoPortal.View.updateEditor('#{commonContentViewBean.id}');"
			oncomplete="#{commonContentViewBean.id}_dialog.hide();"		
			image="./img/icons/add.png" 
			value="保存" 
			style="margin:5px;"
			update="#{addTopicViewBean.id}_form">
		    <h:inputHidden  value="#{addTopicViewBean.id}"/>
		     <h:inputHidden  value="#{topicViewBean.id}"/>
		</p:commandButton>			
		<p:commandButton 
		    title="关闭" 
		    image="./img/icons/cancel.png"			
		    onclick="#{commonContentViewBean.id}_dialog.hide();" 
		    type="button" 			
		    value="关闭" 
		    style="margin:5px;">
		</p:commandButton>
	</ui:define>
</ui:composition>